package com.signway.javaui;

import com.signway.javaui.define.CommonData;
import com.signway.javaui.slice.ComponentAbilitySlice;
import com.signway.javaui.slice.component.*;
import com.signway.javaui.slice.example.CatImageSlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class ComponentAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(ComponentAbilitySlice.class.getName());

        addActionRoute(CommonData.CAT_IMAGE, CatImageSlice.class.getName());

        addActionRoute(CommonData.TEXT_SLICE, TextComponent.class.getName());
        addActionRoute(CommonData.BUTTON_SLICE, ButtonComponent.class.getName());
        addActionRoute(CommonData.PROGRESS_SLICE, ProgressComponent.class.getName());
        addActionRoute(CommonData.IMAGE_SLICE, ImageComponent.class.getName());
        addActionRoute(CommonData.LIST_CONTAINER_SLICE, ListContainerComponent.class.getName());
        addActionRoute(CommonData.PICKER_SLICE, PickerComponent.class.getName());
        addActionRoute(CommonData.CUSTOM_SLICE, CustomComponent.class.getName());
    }
}
